TableListByZone

查询zone下的表的信息

请求地址

GET
http://OmsAddress/app/newoms.php/webservice/business/table-list-by-zone/<set_id>/<app_id>/<zone_id>?cmd=10006&ip-type=webservicerest&access-token=AccessTokenVal

GET请求参数说明

参数名称 数据类型 说明 是否必填字段 备注
set_id 整型 游戏区所在的集群的id
app_id 整型 zone所在的业务的id
zone_id 整型 游戏区的id

返回语法

返回参数说明

  1. 返回状态码不为200时,表示添加zone失败,返回数据为错误信息

  2. 返回状态码为200,表示事务成功,其中表示修改删除成功的zone的信息、failed表示删除失败的zone的信息

请求示例

通过 curl 方法发起请求

命令中的参数请参考本页中的“POST请求参数说明”,access-token的获取方法详见:获取access-token

curl -H "Content-type: application/json" -X "GET" 'http://omsaddress/app/newoms.php/webservice/business/table-list-by-zone/%3Cset_id%3E/%3Capp_id%3E/%3Czone_id%3E?cmd=10006&ip-type=webservicerest&access-token=<access-token>'

返回示例

成功返回示例

http请求的Status=200

[
    {
        "set_id": 1,
        "app_id": 2,
        "zone_id": 3,
        "table_name": "test_table",
        "fmt_type": "tdr",
        "shard_factors": "TimeKey",
        "table_type": 0,
        "table_maxnum": 0,
        "key_fields": "{\"Num\":2,\"KeyField\":[{\"Name\":\"TimeKey\",\"Type\":\"uint32\",\"MaxLen\":4},{\"Name\":\"GameSvrID\",\"Type\":\"int32\",\"MaxLen\":4}]}",
        "value_fields": "{\"Num\":4,\"ValueField\":[{\"Name\":\"GameAppID\",\"Type\":\"string\",\"MaxLen\":64,\"Default\":\"\"},{\"Name\":\"OnlineCntIOS\",\"Type\":\"uint32\",\"MaxLen\":4,\"Default\":\"0\"},{\"Name\":\"OnlineCntAndroid\",\"Type\":\"uint32\",\"MaxLen\":4,\"Default\":\"0\"},{\"Name\":\"strstr\",\"Type\":\"string\",\"MaxLen\":4096,\"Default\":\"\"}]}",
        "dm_ratio": 5,
        "create_date": "2021-06-25 10:38:55",
        "modify_date": "0000-00-00 00:00:00"
    }
]

成功返回参数说明 | 参数名称 | 数据类型 | 说明 | | -------- | -------- | -------------------- | | set_id | 整型 | 游戏区所在的集群的id | | app_id | 整型 | zone所在的业务的id| | zone_id | 整型 | 游戏区的id| | table_name | 字符串 | 表名| | fmt_type | 字符串 | 表结构文件类型(加表是用什么文件类型加表的) |
| shard_factors | 字符串 | 分表因子|
| table_type | 字符串 | 表类型,0代表是generic表,1代表是list表 |
| table_maxnum | 字符串 | list表一条记录的最大数量,表类型为list时该参数有效|
| key_fields | 字符串 | 表的key字段描述|
| value_fields | 字符串 | 表的value字段描述|
| dm_ratio | 整型 | 废弃字段,无需关注|
| create_date | 字符串 | 表创建时间|
| modify_date | 字符串 | 表变更时间|

错误返回

http请求的Status!=200

{
    "name": "Unauthorized",
    "message": "You are requesting with an invalid credential.",
    "code": 0,
    "status": 401,
    "type": "yii\\web UnauthorizedHttpException"
}
{
    "app_id": [
        "ip(10.29.89.53) not in whitelist to get table list (cmd:10006) of set_id:126 app_id:3"
    ]
}

results matching ""

    No results matching ""